package com.gopay.common.domain.cbrmb.internationalcard.intlcardblacklist;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;

import java.util.Date;
import javax.persistence.*;

/**
 * 
 * @ClassName CbRmbIntlCardBlacklist
 * @Description 外卡黑名单
 * @author b.zou
 * @date 2017-10-26
 */
@Entity
@Table(name = "CB_RMB_INTL_CARD_BLACKLIST")
public class CbRmbIntlCardBlacklist extends BaseEntity {

    private static final long serialVersionUID = 5740451853671241311L;
    /**
     * 编号
     */
    private Long sq;

    /**
     * 客户名称
     */
    private String corporationName;

    /**
     * 国付宝交易号
     */
    private String gopayOrderId;

    /**
     * 国付宝交易号对应IP
     */
    private String transIp;

    /**
     * 银行卡号
     */
    private String bankcardNo;

    /**
     * 持卡人名
     */
    private String cardholderFirstName;

    /**
     * 持卡人姓
     */
    private String cardholderLastName;

    /**
     * 持卡人邮箱
     */
    private String cardholderMail;

    /**
     * 持卡人手机号
     */
    private String cardholderPhoneNo;

    /**
     * 加入黑名单原因
     */
    private String reason;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后修改时间
     */
    private Date lastUpdateTime;

    /**
     * 删除状态 0-删除 1-正常
     */
    private String deleteMarker;

    /**
     * 删除时间
     */
    private Date deleteTime;

    /**
     * 增加操作员id
     */
    private String operatorAddId;

    /**
     * 删除操作员id
     */
    private String operatorDelId;

    @Id
    @SequenceGenerator(name = "sq", sequenceName = "CB_RMB_INTL_CARD_BLACKLIST_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sq")
    @Column(name = "SQ", unique = true, nullable = false)
    public Long getSq() {
        return this.sq;
    }

    public void setSq(Long sq) {
        this.sq = sq;
    }

    @Column(name = "CORPORATION_NAME", length = 200)
    public String getCorporationName() {
        return corporationName;
    }

    public void setCorporationName(String corporationName) {
        this.corporationName = corporationName;
    }

    @Column(name = "GOPAY_ORDER_ID", length = 30)
    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    @Column(name = "TRANS_IP", length = 20)
    public String getTransIp() {
        return transIp;
    }

    public void setTransIp(String transIp) {
        this.transIp = transIp;
    }

    @Column(name = "BANKCARD_NO", length = 100)
    public String getBankcardNo() {
        this.bankcardNo = SensitiveInfoUtils.autoReencrypt(this.bankcardNo);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.bankcardNo);
    }

    public void setBankcardNo(String bankcardNo) {
        this.bankcardNo = SensitiveInfoUtils.smartEncryptWithCheck(bankcardNo);
    }

    @Column(name = "CARDHOLDER_FIRST_NAME", length = 100)
    public String getCardholderFirstName() {
        this.cardholderFirstName = SensitiveInfoUtils.autoReencrypt(this.cardholderFirstName);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.cardholderFirstName);
    }

    public void setCardholderFirstName(String cardholderFirstName) {
        this.cardholderFirstName = SensitiveInfoUtils.smartEncryptWithCheck(cardholderFirstName);
    }

    @Column(name = "CARDHOLDER_LAST_NAME", length = 100)
    public String getCardholderLastName() {
        this.cardholderLastName = SensitiveInfoUtils.autoReencrypt(this.cardholderLastName);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.cardholderLastName);

    }

    public void setCardholderLastName(String cardholderLastName) {
        this.cardholderLastName = SensitiveInfoUtils.smartEncryptWithCheck(cardholderLastName);
    }

    @Column(name = "CARDHOLDER_MAIL", length = 100)
    public String getCardholderMail() {
        return cardholderMail;
    }

    public void setCardholderMail(String cardholderMail) {
        this.cardholderMail = cardholderMail;
    }

    @Column(name = "CARDHOLDER_PHONE_NO", length = 100)
    public String getCardholderPhoneNo() {
        this.cardholderPhoneNo = SensitiveInfoUtils.autoReencrypt(this.cardholderPhoneNo);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.cardholderPhoneNo);
    }

    public void setCardholderPhoneNo(String cardholderPhoneNo) {
        this.cardholderPhoneNo = SensitiveInfoUtils.smartEncryptWithCheck(cardholderPhoneNo);
    }

    @Column(name = "REASON", length = 800)
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "LAST_UPDATE_TIME")
    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    @Column(name = "DELETE_MARKER", length = 1)
    public String getDeleteMarker() {
        return deleteMarker;
    }

    public void setDeleteMarker(String deleteMarker) {
        this.deleteMarker = deleteMarker;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "DELETE_TIME")
    public Date getDeleteTime() {
        return deleteTime;
    }

    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    @Column(name = "OPERATOR_ADD_ID", length = 18)
    public String getOperatorAddId() {
        return operatorAddId;
    }

    public void setOperatorAddId(String operatorAddId) {
        this.operatorAddId = operatorAddId;
    }

    @Column(name = "OPERATOR_DEL_ID", length = 18)
    public String getOperatorDelId() {
        return operatorDelId;
    }

    public void setOperatorDelId(String operatorDelId) {
        this.operatorDelId = operatorDelId;
    }
}
